<template>
  <div class="tab-bar">
    <van-tabbar v-model="active" fixed>
      <van-tabbar-item
      v-for="router in tabNavs"
      :key="router.path"
      :to="router.path"
      icon="home-o"
      >{{router.meta.title}}</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import router from '@/router/routes'
export default {
  name: 'TabBar',
  data () {
    return {
      active: 0,
      fixed: true
    }
  },
  computed: {
    tabNavs () {
      return router.filter(router => router.meta && router.meta.isTab)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
